<!--#include file="lib/utf-8.asp"-->
<!--#include file="lib/conn.asp"-->
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link type="text/css" rel="stylesheet" href="lib/jquery_datatables_lastest/media/css/demo_page.css" />
<link type="text/css" rel="stylesheet" href="lib/jquery_datatables_lastest/media/css/demo_table_jui.css" />
<link type="text/css" rel="stylesheet" href="lib/jquery.ui/themes/base/jquery.ui.all.css" />
<link href="lib/yaml/central_draft.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="lib/jquery_lastest.js"></script>
<script type="text/javascript" src="lib/jquery_datatables_lastest/media/js/jquery.dataTables.min.js"></script>
<script type="text/javascript">
	$(function() {
		$(".contable tbody tr").live('hover',function(){	//对返回的dom进行hover事件捕获
			$(this).toggleClass("over");	//添加css样式
		});

		oTable = $('.contable').dataTable({
			"iDisplayLength": 50,
			"bJQueryUI": true,
			"sPaginationType": "full_numbers",
			"oLanguage": {
				"sUrl": "lib/jquery_datatables_lastest/media/language/zh_CN.txt"
			},
			"aaSorting": [[1,'asc']]


		});
		
	
		
	});
</script>	
</head>

<body>

<%
	call CheckRights(0,15)

	Set rs = Server.CreateObject("ADODB.Recordset")
	sql = "SELECT *  FROM yh"
	rs.Open sql,conn,1,1
	If rs.eof Then
		rs.close
%>
		<p><a href="add_user.asp">用户数据不存在，请添加</a></p>
<%
		response.end
	End If

%>
<div  class="page_margins">
  <div class="page">
    <div id="nav">

      <div class="hlist">
        <ul>
          <li><a href="manage_user.asp">用户信息管理</a></li>
          <li><a href="add_user.asp">添加用户</a></li>
        </ul>
      </div>

    </div>

<table class="contable display">
	<thead>
		<tr>
      <th>ID</th>
      <th>用户名</th>
      <th>姓名</th>
      <th>激活</th>
      <th>岗位和权限</th>
    </tr>
	</thead>
	<tbody>
	<% while not rs.eof %>
  	<tr>
      <td>
			<%
				if Session("MM_Username")="admin" then
			%>
			<a href="edit_user.asp?id=<%=rs("id")%>"><%=rs("id")%></a>
			<%
				elseif rs("user")="admin" then
					response.write(rs("id"))
				else
			%>
			<a href="edit_user.asp?id=<%=rs("id")%>"><%=rs("id")%></a>
			<%
				end if
			%>
			
			</td>
      <td><%=rs("user")%></td>
      <td><%=rs("name")%></td>
      <td><%=rs("active")%></td>
      <td><%
		temp=split(rs("post"),",")
		temp1=split(rs("flag"),",")
		post=""
		flag=""
		for i=0 to ubound(temp)
			response.write fpost(temp(i))&"："&fflag(temp1(i))&"<br />"
		next
	  %></td>
    </tr>
	<% rs.movenext
	wend %>
	</tbody>
</table>
</div>
</div>
<% rs.close
	set rs=nothing
	conn.close
	set conn=nothing
	
%>
</body>
</html>
